class Blacklist:
    sources = {
        "SOURCE_NETWORK": [
            "robotparser.RobotFileParser.read",
            "asyncore.dispatcher.recv",
            "mimetypes.MimeTypes.read",
            "mimetypes.MimeTypes.readfp",
            "mimetypes.MimeTypes.read_windows_registry",
            "mimetypes.MimeTypes.read_mime_types",
            "urllib.urlretrieve",
            "socket.getaddrinfo",
            "socket.gethostbyname",
            "socket.gethostname",
            "socket.recv",
            "socket.recvfrom",
            "socket.recvmsg",
            "socket.recvmsg_into",
            "socket.recvfrom_into",
            "socket.recv_into",
            "ssl.SSLSocket.read",
            "asyncio.StreamReader.read",
            "asyncio.StreamReader.readline",
            "asyncio.StreamReader.readexactly",
            "asyncio.StreamReader.readuntil",
            "asyncio.StreamWriter.write",
            "asyncio.StreamWriter.writelines"
        ],
        "SOURCE_USER_INPUT": [
            "input",
            "raw_input"
        ],
        "SOURCE_FILE": [
            "os.pread",
            "os.preadv",
            "os.read",
            "fileinput.input",
            "fileinput.FileInput",
            "filecmp.cmp",
            "filecmp.cmpfiles",
            "filecmp.dircmp",
            "linecache.getline",
            "plistlib.readPlist",
            "plistlib.readPlistFromResource",
            "io.IOBase.readline",
            "io.IOBase.readlines",
            "mailbox.Mailbox",
            "mailbox.Maildir",
            "mailbox.mbox",
            "mailbox.MH",
            "mailbox.Babyl",
            "mailbox.MMDF",
            "cookielib.FileCookieJar",
            "cookielib.MozillaCookieJar",
            "cookielib.LWPCookieJar",
            "macostools.copy",
            "macostools.copytree",
            "macostools.mkalias",
            "findertools.copy",
            "findertools.move",
            "lzma.open",
            "lzma.LZMAFile",
            "pathlib.Path.replace",
            "http.cookiejar.FileCookieJar",
            "http.cookiejar.MozillaCookieJar",
            "http.cookiejar.LWPCookieJar",
            "getpass.getuser"
        ],
        "SOURCE_ACCOUNT": [
            "spwd.getspnam",
            "spwd.getspall",
            "pwd.getpwuid",
            "pwd.getpwnam",
            "pwd.getpwall"
        ],
        "SOURCE_SETTINGS": [
            "_winreg.ConnectRegistry",
            "winreg.ConnectRegistry"
        ],
        "SOURCE_OBFUSCATION": [
            "base64.b64decode",
            "base64.standard_b64decode",
            "base64.urlsafe_b64decode",
            "base64.b32decode",
            "base64.b16decode",
            "base64.decode",
            "base64.decodestring"
        ]
    }
    sinks = {
        "SINK_NETWORK": [
            "asyncore.dispatcher.send",
            "socket.send",
            "socket.sendall",
            "socket.sendto",
            "socket.sendto",
            "socket.sendmsg",
            "socket.sendmsg_afalg",
            "socket.sendfile",
            "ssl.SSLSocket.write",
            "ssl.SSLSocket.send",
            "ssl.SSLSocket.sendall",
            "ssl.SSLSocket.sendfile"
        ],
        "SINK_FILE": [
            "os.sendfile",
            "os.write",
            "os.writev",
            "os.pwrite",
            "os.pwritev",
            "plistlib.writePlist",
            "plistlib.writePlistToResource",
            "io.IOBase.writelines",
            "io.RawIOBase.write",
            "io.BufferedIOBase.write",
            "io.TextIOBase.write",
            "tempfile.mkstemp",
            "tempfile.mkdtemp",
            "tempfile.TemporaryFile",
            "tempfile.NamedTemporaryFile",
            "tempfile.SpooledTemporaryFile"
        ]
    }
    sourcesinks = {
        "SOURCE_NETWORK": [
            "urllib.urlopen",
            "urllib.URLopener",
            "urllib.FancyURLopener",
            "urllib2.urlopen",
            "urllib2.Request",
            "urllib2.OpenerDirector.open",
            "urllib2.FTPHandler.ftp_open",
            "urllib2.HTTPHandler.http_open",
            "urllib2.FileHandler.file_open",
            "urllib2.HTTPSHandler.https_open",
            "httplib.HTTPConnection",
            "httplib.HTTPSConnection",
            "ftplib.FTP_TLS",
            "ftplib.FTP",
            "poplib.POP3",
            "poplib.POP3_SSL",
            "imaplib.IMAP4",
            "imaplib.IMAP4_SSL",
            "imaplib.IMAP4_stream",
            "nntplib.NNTP",
            "smtplib.SMTP",
            "smtplib.LMTP",
            "smtplib.SMTP_SSL",
            "telnetlib.Telnet",
            "socket.create_connection",
            "socket.socket",
            "socket.socketpair",
            "ssl.SSLSocket",
            "asyncio.open_connection",
            "asyncio.open_unix_connection",
            "http.client.HTTPConnection",
            "http.client.HTTPSConnection",
            "urllib.request.urlopen",
            "urllib.request.URLopener",
            "urllib.request.FancyURLopener"
        ],
        "SOURCE_FILE": [
            "open",
            "file",
            "os.fdopen",
            "os.open",
            "os.openpty",
            "shelve.DbfilenameShelf",
            "shelve.open",
            "anydbm.open",
            "dbm.open",
            "gdbm.open",
            "dbhash.open",
            "bsddb.hashopen",
            "bsddb.btopen",
            "bsddb.rnopen",
            "dumbdbm.open",
            "sqlite3.connect",
            "gzip.open",
            "gzip.GzipFile",
            "bz2.BZ2File",
            "zipfile.ZipFile",
            "tarfile.open",
            "tarfile.TarFile",
            "tarfile.TarFileCompat",
            "io.open",
            "io.FileIO",
            "aifc.open",
            "sunau.open",
            "sunau.openfp",
            "wave.open",
            "wave.openfp",
            "ossaudiodev.open"
        ]
    }
    dangers = {
        "SINK_NETWORK": [
            "webbrower.open",
            "webbrower.open_new",
            "webbrower.open_new_tab",
            "wsgiref.simple_server.WSGIServer",
            "wsgiref.simple_server.make_server",
            "SocketServer.UDPServer",
            "SocketServer.TCPServer",
            "SocketServer.UnixStreamServer",
            "SocketServer.UnixDatagramServer",
            "SocketServer.BaseServer",
            "BaseHTTPServer.HTTPServer",
            "xmlrpclib.ServerProxy",
            "SimpleXMLRPCServer.SimpleXMLRPCServer",
            "DocXMLRPCServer.DocXMLRPCServer",
            "socketserver.UDPServer",
            "socketserver.TCPServer",
            "socketserver.UnixStreamServer",
            "socketserver.UnixDatagramServer",
            "socketserver.BaseServer",
            "socketserver.ForkingTCPServer",
            "socketserver.ForkingUDPServer",
            "socketserver.ThreadingTCPServer",
            "socketserver.ThreadingUDPServer",
            "asyncio.start_server",
            "asyncio.start_unix_server",
            "asyncore.dispatcher",
            "asyncore.dispatcher_with_send",
            "asynchat.async_chat",
            "urllib.request.build_opener",
            "http.server.HTTPServer",
            "http.server.ThreadingHTTPServer",
            "xmlrpc.client.ServerProxy",
            "xmlrpc.server.SimpleXMLRPCServer",
            "xmlrpc.server.DocXMLRPCServer"
        ],
        "SINK_FILE": [
            "os.rename",
            "os.replace",
            "os.remove",
            "os.removedirs",
            "os.renames",
            "os.rmdir",
            "os.unlink",
            "shutil.copyfileobj",
            "shutil.copyfile",
            "shutil.copy",
            "shutil.copy2",
            "shutil.copytree",
            "shutil.rmtree",
            "shutil.move",
            "shutil.make_archive",
            "pathlib.Path.rename",
            "pathlib.Path.rmdir",
            "pathlib.Path.unlink"
        ],
        "SINK_PROCESS_OPERATION": [
            "os.abort",
            "os.execl",
            "os.execle",
            "os.execlp",
            "os.execlpe",
            "os.execv",
            "os.execve",
            "os.execvp",
            "os.execvpe",
            "os._exit",
            "os.fork",
            "os.forkpty",
            "os.kill",
            "os.killpg",
            "os.spawnl",
            "os.spawnle",
            "os.spawnlp",
            "os.spawnlpe",
            "os.spawnv",
            "os.spawnve",
            "os.spawnvp",
            "os.spawnvpe",
            "os.startfile",
            "os.system",
            "os.register_at_fork",
            "os.popen",
            "os.popen2",
            "os.popen3",
            "os.popen4",
            "subprocess.run",
            "subprocess.call",
            "subprocess.check_call",
            "subprocess.check_output",
            "subprocess.Popen",
            "multiprocessing.Process",
            "multiprocessing.connection.Connection",
            "multiprocessing.connection.Connection.recv",
            "multiprocessing.connection.Connection.recv_bytes",
            "multiprocessing.connection.Connection.recv_bytes_into",
            "multiprocessing.connection.Connection.send",
            "multiprocessing.connection.Connection.send_bytes",
            "multiprocessing.Manager",
            "multiprocessing.managers.BaseManager",
            "multiprocessing.managers.SyncManager",
            "multiprocessing.Pool",
            "multiprocessing.pool.Pool",
            "signal.alarm",
            "signal.pause",
            "signal.siginterrupt",
            "signal.signal",
            "popen2.popen2",
            "popen2.popen3",
            "popen2.popen4",
            "popen2.Popen3",
            "popen2.Popen4",
            "sys.exit",
            "commands.getstatusoutput",
            "commands.getoutput",
            "commands.getstatus",
            "pipes.Template",
            "pty.fork",
            "pty.openpty",
            "pty.spawn",
            "threading.Thread",
            "asyncio.create_subprocess_exec",
            "asyncio.create_subprocess_shell",
            "concurrent.futures.Executor",
            "concurrent.futures.ThreadPoolExecutor",
            "concurrent.futures.ProcessPoolExecutor",
            "concurrent.futures.Future",
            "subprocess.getstatusoutput",
            "subprocess.getoutput"
        ],
        "SINK_CODE_GENERATION": [
            "eval",
            "execfile",
            "__import__",
            "getattr",
            "delattr",
            "setattr",
            "compile",
            "exec",
            "ctypes.CDLL",
            "ctypes.OleDLL",
            "ctypes.WinDLL",
            "ctypes.PyDLL",
            "sys.exitfunc",
            "sys.settrace",
            "sys.setprofile",
            "code.interact",
            "code.compile_command",
            "code.InteractiveInterpreter",
            "code.InteractiveConsole",
            "codeop.compile_command",
            "codeop.Compile",
            "codeop.CommandCompiler",
            "imp.load_module",
            "imp.load_compiled",
            "imp.load_dynamic",
            "importlib.import_module",
            "zipimport.zipimporter",
            "pkgutil.ImpImporter",
            "pkgutil.ImpLoader",
            "pkgutil.find_loader",
            "pkgutil.get_importer",
            "pkgutil.get_loader",
            "modulefinder.AddPackagePath",
            "modulefinder.ReplacePackage",
            "runpy.run_module",
            "runpy.run_path",
            "parser.expr",
            "parser.suite",
            "py_compile.compile",
            "py_compile.main",
            "compileall.compile_dir",
            "compileall.compile_file",
            "compileall.compile_path",
            "dl.open",
            "atexit.register"
        ]
    }
